<?php

namespace app\admin;

use think\Exception;
use think\facade\Request;

class CommonException extends Exception
{
    public $src;
    public $param;

    public function __construct($message,$url='',$code=400,$param=[])
    {
        $this->src = $url ?? request()->url();
        $this->param = $param;
        parent::__construct($message, $code, null);
    }
    public function getSrc(){
        return $this->src;
    }

}